\(\int x (a+b \text {sech}(c+d x^2)) \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 26 \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\frac {a x^2}{2}+\frac {b \arctan \left (\sinh \left (c+d x^2\right )\right )}{2 d} \]

[Out]

1/2*a*x^2+1/2*b*arctan(sinh(d*x^2+c))/d

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {14, 5544, 3855} \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\frac {a x^2}{2}+\frac {b \arctan \left (\sinh \left (c+d x^2\right )\right )}{2 d} \]

[In]

Int[x*(a + b*Sech[c + d*x^2]),x]

[Out]

(a*x^2)/2 + (b*ArcTan[Sinh[c + d*x^2]])/(2*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 5544

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = \int \left (a x+b x \text {sech}\left (c+d x^2\right )\right ) \, dx \\ & = \frac {a x^2}{2}+b \int x \text {sech}\left (c+d x^2\right ) \, dx \\ & = \frac {a x^2}{2}+\frac {1}{2} b \text {Subst}\left (\int \text {sech}(c+d x) \, dx,x,x^2\right ) \\ & = \frac {a x^2}{2}+\frac {b \arctan \left (\sinh \left (c+d x^2\right )\right )}{2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\frac {a x^2}{2}+\frac {b \arctan \left (\sinh \left (c+d x^2\right )\right )}{2 d} \]

[In]

Integrate[x*(a + b*Sech[c + d*x^2]),x]

[Out]

(a*x^2)/2 + (b*ArcTan[Sinh[c + d*x^2]])/(2*d)

Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88

method result size
parts \(\frac {a \,x^{2}}{2}+\frac {b \arctan \left (\sinh \left (d \,x^{2}+c \right )\right )}{2 d}\) \(23\)
derivativedivides \(\frac {\left (d \,x^{2}+c \right ) a +b \arctan \left (\sinh \left (d \,x^{2}+c \right )\right )}{2 d}\) \(27\)
default \(\frac {\left (d \,x^{2}+c \right ) a +b \arctan \left (\sinh \left (d \,x^{2}+c \right )\right )}{2 d}\) \(27\)
risch \(\frac {a \,x^{2}}{2}+\frac {i b \ln \left ({\mathrm e}^{d \,x^{2}+c}+i\right )}{2 d}-\frac {i b \ln \left ({\mathrm e}^{d \,x^{2}+c}-i\right )}{2 d}\) \(46\)
parallelrisch \(\frac {a d \,x^{2}-i b \ln \left (\tanh \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )-i\right )+i b \ln \left (\tanh \left (\frac {d \,x^{2}}{2}+\frac {c}{2}\right )+i\right )}{2 d}\) \(51\)

[In]

int(x*(a+b*sech(d*x^2+c)),x,method=_RETURNVERBOSE)

[Out]

1/2*a*x^2+1/2*b*arctan(sinh(d*x^2+c))/d

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.27 \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\frac {a d x^{2} + 2 \, b \arctan \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right )\right )}{2 \, d} \]

[In]

integrate(x*(a+b*sech(d*x^2+c)),x, algorithm="fricas")

[Out]

1/2*(a*d*x^2 + 2*b*arctan(cosh(d*x^2 + c) + sinh(d*x^2 + c)))/d

Sympy [A] (verification not implemented)

Time = 0.60 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.50 \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\begin {cases} \frac {a \left (c + d x^{2}\right ) + 2 b \operatorname {atan}{\left (\tanh {\left (\frac {c}{2} + \frac {d x^{2}}{2} \right )} \right )}}{2 d} & \text {for}\: d \neq 0 \\\frac {x^{2} \left (a + b \operatorname {sech}{\left (c \right )}\right )}{2} & \text {otherwise} \end {cases} \]

[In]

integrate(x*(a+b*sech(d*x**2+c)),x)

[Out]

Piecewise(((a*(c + d*x**2) + 2*b*atan(tanh(c/2 + d*x**2/2)))/(2*d), Ne(d, 0)), (x**2*(a + b*sech(c))/2, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\frac {1}{2} \, a x^{2} + \frac {b \arctan \left (\sinh \left (d x^{2} + c\right )\right )}{2 \, d} \]

[In]

integrate(x*(a+b*sech(d*x^2+c)),x, algorithm="maxima")

[Out]

1/2*a*x^2 + 1/2*b*arctan(sinh(d*x^2 + c))/d

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.08 \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\frac {{\left (d x^{2} + c\right )} a}{2 \, d} + \frac {b \arctan \left (e^{\left (d x^{2} + c\right )}\right )}{d} \]

[In]

integrate(x*(a+b*sech(d*x^2+c)),x, algorithm="giac")

[Out]

1/2*(d*x^2 + c)*a/d + b*arctan(e^(d*x^2 + c))/d

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.62 \[ \int x \left (a+b \text {sech}\left (c+d x^2\right )\right ) \, dx=\frac {a\,x^2}{2}+\frac {\mathrm {atan}\left (\frac {b\,{\mathrm {e}}^{d\,x^2}\,{\mathrm {e}}^c\,\sqrt {d^2}}{d\,\sqrt {b^2}}\right )\,\sqrt {b^2}}{\sqrt {d^2}} \]

[In]

int(x*(a + b/cosh(c + d*x^2)),x)

[Out]

(a*x^2)/2 + (atan((b*exp(d*x^2)*exp(c)*(d^2)^(1/2))/(d*(b^2)^(1/2)))*(b^2)^(1/2))/(d^2)^(1/2)